package com.xuecheng.base.execption;

public class TeachplanException extends RuntimeException{
    private String errCode;
    private String errMessage;

    public TeachplanException() {
        super();
    }

    public TeachplanException( String errCode,String errMessage) {
        this.errMessage = errMessage;
        this.errCode = errCode;
    }
    // 通过 TeachplanError 枚举创建异常
    public TeachplanException(TeachplanError error) {
        this.errMessage = error.getErrMessage();
        this.errCode = error.getErrCode();
    }

    public String getErrMessage() {
        return errMessage;
    }
    public String getErrCode() {
        return errCode;
    }


}
